package fy.form.listen.manager;

import java.io.BufferedReader;
import java.util.ArrayList;
import java.util.List;

import fy.util.MyUtil;


public final class MyImport {

	public static List<Long> getSummaryArray() {
		List<Long> summaryIDArray = new ArrayList<Long>();

		String path = MyUtil.getRealPath(MyImport.class) + "summary";

		try {
			BufferedReader br = MyUtil.createBufferedReader(path);

			String temp = null;
			while ((temp = br.readLine()) != null) {
				summaryIDArray.add(Long.valueOf(temp));
			}
			br.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return summaryIDArray;
	}
	/**
	 * 获取个人发展计划表summaryID
	 * @return
	 */
	public static List<Long> getSummaryArray_Plans() {
		List<Long> summaryIDArray = new ArrayList<Long>();

		String path = MyUtil.getRealPath(MyImport.class) + "summary_plans";

		try {
			BufferedReader br = MyUtil.createBufferedReader(path);

			String temp = null;
			while ((temp = br.readLine()) != null) {
				summaryIDArray.add(Long.valueOf(temp));
			}
			br.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return summaryIDArray;
	}
	
	public static List<String> getClassNameArray() {
		List<String> classNameArray = new ArrayList<String>();
		String path = MyUtil.getRealPath(MyImport.class) + "class_reload";
		try {
			BufferedReader br = MyUtil.createBufferedReader(path);

			String temp = null;
			while ((temp = br.readLine()) != null) {
				classNameArray.add((temp));
			}
			br.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return classNameArray;
	}

	public static String getOperator() {
		String operator = null;
		String path = MyUtil.getRealPath(MyImport.class) + "operator";

		try {
			BufferedReader br = MyUtil.createBufferedReader(path);
			operator = br.readLine();
			br.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return operator;
	}
	
	public static void main(String[] args) {
		System.out.println(MyImport.getSummaryArray());
	}
}
